Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create process instance for specific version #246

Merged
merged 4 commits into from
Nov 22, 2022
Merged

Conversation

ChrisKujawa
Copy link
Member

@ChrisKujawa ChrisKujawa commented Nov 22, 2022

Allows creating a process instance for a specific version and BPMN process id via the verify steady-state command.
This is useful for the deployment distribution command.

Furthermore, I also created the first version of a Zeebe Fake client, in order to intercept values which are set on the client requests. This allows us to create more unit tests where we can verify whether the right properties and values are set.

Added some new tests for the process instance creation via version and BPMN process id.

closes #244


Example:

Deploy model

$ ./zbchaos deploy process -v
Connecting to zell-chaos
Running experiment in self-managed environment.
Successfully created port forwarding tunnel
Deploy 10 versions of different type of models.
Deployed [2/10] versions.
Deployed [4/10] versions.
Deployed [6/10] versions.
Deployed [8/10] versions.
Deployed [10/10] versions.
Deployed different process models of different types and versions to zeebe!

Non-verbose: Start instance for a specific version

$ ./zbchaos verify steady-state --version 10 --bpmnProcessId multiVersion
The steady-state was successfully verified!

We can see in operate:

execution

Verbose: Start instance for a specific version

$ ./zbchaos verify steady-state --version 10 --bpmnProcessId multiVersion -v
Connecting to zell-chaos
Running experiment in self-managed environment.
Successfully created port forwarding tunnel
Create process instance with BPMN process ID multiVersion and version 10 [variables: '', awaitResult: false]
Created process instance with key 4503599627370497 on partition 2, required partition 1.
Created process instance with key 6755399441055745 on partition 3, required partition 1.
Created process instance with key 2251799813685299 on partition 1, required partition 1.
The steady-state was successfully verified!

execution2

Allow to create a process instance for given version and process ID
Add fake implementation of the Zeebe client.

Can be used for unit tests to verify whether the right properties are set. Should be continously extended to
increase test coverage.
Move the code for creating the process instances to the internal package
Use the new fake implementation to test the PI creation

Right now the deployment is hard to test, since it doesn't return interfaces
Copy link
Contributor

@lenaschoenburg lenaschoenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Good idea to start mocking zeebe client!

go-chaos/cmd/verify.go Show resolved Hide resolved
@ChrisKujawa ChrisKujawa merged commit 8525fcb into main Nov 22, 2022
@ChrisKujawa ChrisKujawa deleted the zell-version-instance branch November 22, 2022 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create instance with specific version
2 participants